Floating point numbers are comprised of a digit and a decimal point followed by a certain number of significant digits, for example 52, multiplied by 2 to a power. For example, a floating point number can be expressed as (1.10110 . . . )*(2.sup.x). Consequently, floating point numbers are represented by a mantissa and an exponent. A mantissa is the digit and binary point followed by the significant digits. Therefore, the mantissa typically has a total of 53 significant digits. The exponent is the power to which 2 is taken.
Mathematical operations on floating point numbers can be carried out by a computer. One such operation is the multiply/add operation. The multiply/add operation calculates Ra*Rc+Rb, where Ra, Rb, and Rc are floating point operands. Typical split multiply/adds carry out the operation Ra*Rc first, thereby providing an intermediate product, Rm. After Rm is calculated and rounded, the sum Rm+Rb is calculated. In order to perform these operations in a timely manner, conventional processors round Rm. This can introduce error into the calculations. Typical floating point adds also require two wide shifters to align the mantissas prior to addition and to normalize the final result. Wide shifters cause significant delays in data flows. Thus, conventional split multiply/adds are slow.
One way to address this problem is to utilize a fused multiply/add operation to carry out the operations and have infinite precision. As discussed above, a split multiply/add rounds the intermediate product Rm=Ra*Rc, causing a loss in precision. A fused multiply/add, on the other hand, calculates Ra*Rc+Rb in one instruction. Since there is no intermediate rounding, all the significant digits of the mantissa of Ra*Rc are retained. Because all of the significant digits are retained, there is no loss in precision. For the purposes of this application, when there is no loss in precision, the operation is said to have infinite precision. Because the fused multiply/add operation preserves all of the significant digits the mantissa of Ra*Rc, the fused multiply/add operation has infinite precision.
However, current implementations of the fused multiply/add operation still align the mantissa of Rb to the mantissa of Ra*Rc through a wide shifter. In addition, a fused multiply/add operation normalizes the mantissa of Ra*Rc+Rb through a wide shifter. The use of these two wide shifters significantly slows the calculation of Ra*Rc+Rb in the fused multiply/add.
Accordingly, what is needed is a system and method for maintaining the infinite precision of the fused multiply/add while increasing the speed at which multiply/add operations are performed. The present invention addresses such a need.